import { post , get } from "./ajax";


// 服务层  services (集中接口)

export const http = {
    
    // 注册
    register:body=>post("/vue/signup",body),

    // 登陆
    login :body=>post("/vue/login",body),

    // 发送验证码
    sendcaptcha:params=>get("/vue/sendcaptcha",params),

    // 校验验证码
    verifycaptcha:params=>get("/vue/verifycaptcha",params),

    // 获取个人信息
    getuserinfo:params=>get("/vue/getuserinfo",params),

    // 上传头像
    sendAvatar:body=>post("/vue/send-avatar",body),

    // 获取卖座数据
    getCity:(params,headers)=>get("/gateway?k=7031657",params,headers),


    // 自定义接口获取卖座数据
    getmaizuodata:(params,headers)=>get("/vue/getmaizuodata",params,headers),

    
    postmaizuodata:(body,headers)=>post("/vue/postmaizuodata",body,headers),

    // getmockgooddata:(url,params,headers)=>get("http://localhost:3200"+url,params,headers),
  
    gethua:params=>get("https://t.flowerplus.cn/product_new/info?",params),
    getssq:params=>get("https://code.aliyun.com/hi31588535/outside_chain/raw/master/ssq.json",params),

}

